package com.fingard.dsp.bank.reqrespobj.cashpool;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RequestBase;
import com.fingard.dsp.bank.reqrespobj.cashpool.Detail.ReqCPAQCashPoolAccQryDetail;
import com.fingard.xml.XmlTextReader;

public class ReqCPAQCashPoolAccQry extends RequestBase {
    public int detailCount = -1;
    private XmlTextReader xmlReader;

    public ReqCPAQCashPoolAccQryDetail readedDetail;

    public ReqCPAQCashPoolAccQry(XmlTextReader p_xmlReader, ReqRespHeader p_header) throws Exception {
        reqHeader = p_header;
        xmlReader = p_xmlReader;
        detailCount = xmlReader.countElement(PATH_Detail);
    }

    public boolean readRecord() throws Exception {
        readedDetail = null;
        if (xmlReader.read(PATH_Detail)) {//  /ATSYH/TransReq/TransParam/DetailRecord
            readedDetail = new ReqCPAQCashPoolAccQryDetail(xmlReader.readedXElement);
            return true;
        } else {
            return false;
        }
    }
}
